package regexInput;

import java.util.ArrayList;

public class StateNode {

	private String name;
	private int state;	//0 for starting state, 1 for end state, -1 otherwise
	private ArrayList<String> nfaList;
	
	public StateNode(String name){
		setName(name);
		nfaList = new ArrayList<String>(10);
		setState(-1);
	}
	
	public StateNode(String counter, int type){
		setName(counter);
		nfaList = new ArrayList<String>(10);
		setState(type);
	}

	/**
	 * @param name2 the name to set
	 */
	public void setName(String name2) {
		this.name = name2;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(int state) {
		this.state = state;
	}

	/**
	 * @return the state
	 */
	public int getState() {
		return state;
	}

	/**
	 * @param nfaNODE the nfaNODE to set
	 */
	public void setNFAState(ArrayList<String> list){;
		nfaList = list;
	}

	public void addNFAState(String state){;
		nfaList.add(state);
	}
	/**
	 * @return the nfaNODE
	 */
	public ArrayList<String> getNFAList() {
		return nfaList;
	}
	
	public String toString(){
		String s = "";
		s += getName();
		return s;
	}
}
